extends site

if typeof refresh == 'undefined'
  - var refresh = 5

block append head
  meta(
    http-equiv='refresh'
    content=refresh+'; url='+(link[0]=='/'?link:basePath+link)
  )
  style
    .secs {
      display: none;
    }
  script
    $(function() {
      $('.secs').css('display', 'inline');
      setInterval(function () {
        var sec = parseInt($('#seconds').text());
        $('#seconds').text(sec >= 0 ? --sec : 0);
      }, 1000);
    });

block main-stage
  .hero-unit
    h1 完成！ ^_^
    p= message
    a(href=link).btn.btn-primary
      span.secs
        span#seconds= refresh
        | 秒后
      继续

